package main

import "fmt"

func main() {

	const pei = 3.14
	fmt.Println(pei) // 3.14

	// 批量声明
	const (
		ok       = 200
		not_find = 404
	)
	fmt.Println(ok, not_find) // 200 404

	// 枚举 iota 从0开始每增加一行就会累加1 直到遇到 const 才会重新从0开始
	// iota
	const (
		n1 = iota
		_
		n2
		n3
	)
	fmt.Println(n1, n2, n3, ) // 0 2 3
	const (
		n4 = iota
		n5
	)
	fmt.Println(n4, n5) // 0 1

	const (
		_  = iota
		KB = 1 << (10 * iota)
		MB
		GB
		TB
		PB
	)
	fmt.Println(KB, MB, GB, TB, PB)
}
